package views.activity;

import java.awt.Font;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.SwingConstants;

public class SearchVolunteerActivityView extends JPanel {

	public JTextField txtTitle;
	public JTextField txtType;
	public JComboBox<String> cmbMonthFiled;
	public JComboBox<String> cmbDayFiled;
	public JComboBox<String> cmbYearFiled;
	public JComboBox<String> cmbMonthApproved;
	public JComboBox<String> cmbDayApproved;
	public JComboBox<String> cmbYearApproved;
	public JComboBox<String> cmbMonthOfActivity;
	public JComboBox<String> cmbDayOfActivity;
	public JComboBox<String> cmbYearOfActivity;
	public JComboBox<String> cmbMonthDue;
	public JComboBox<String> cmbDayDue;
	public JComboBox<String> cmbYearDue;
	public JTextField txtOrgName;
	public JTextField txtOrgType;
	public JTextField txtBeneficiary;
	public JTextArea txaRemark;
	public JComboBox<String> cmbCanceled;
	public JComboBox<String> cmbHasEvaluations;
	public JButton btnClear;
	public JButton btnSearch;
	
	public SearchVolunteerActivityView() {
		this.setSize(730, 379);
		this.setLayout(null);
		
		JLabel lblSearchBy = new JLabel("Search by...");
		lblSearchBy.setFont(new Font("Arial", Font.PLAIN, 15));
		lblSearchBy.setBounds(10, 10, 350, 30);
		this.add(lblSearchBy);
		
		JLabel lblAddValuesOnly = new JLabel("Add values only to the ones you want to search.");
		lblAddValuesOnly.setHorizontalAlignment(SwingConstants.RIGHT);
		lblAddValuesOnly.setFont(new Font("Arial", Font.PLAIN, 12));
		lblAddValuesOnly.setBounds(370, 10, 350, 20);
		this.add(lblAddValuesOnly);
		
		JPanel panelLeft = new JPanel();
		panelLeft.setBounds(10, 48, 350, 320);
		panelLeft.setLayout(null);
		this.add(panelLeft);
		
		JPanel panelRight = new JPanel();
		panelRight.setBounds(370, 48, 350, 320);
		panelRight.setLayout(null);
		this.add(panelRight);
		
		JScrollPane scpRemark = new JScrollPane();
		scpRemark.setBounds(10, 130, 330, 70);
		panelRight.add(scpRemark);
		
		JLabel lblActivityTitle = new JLabel("Activity Title");
		lblActivityTitle.setFont(new Font("Arial", Font.PLAIN, 12));
		lblActivityTitle.setBounds(10, 10, 330, 20);
		panelLeft.add(lblActivityTitle);
		
		JLabel lblActivityType = new JLabel("Activity Type");
		lblActivityType.setFont(new Font("Arial", Font.PLAIN, 12));
		lblActivityType.setBounds(10, 60, 330, 20);
		panelLeft.add(lblActivityType);
		
		JLabel lblDateFiled = new JLabel("Date Filed");
		lblDateFiled.setFont(new Font("Arial", Font.PLAIN, 12));
		lblDateFiled.setBounds(10, 110, 330, 20);
		panelLeft.add(lblDateFiled);
		
		JLabel lblDateApproved = new JLabel("Date Approved");
		lblDateApproved.setFont(new Font("Arial", Font.PLAIN, 12));
		lblDateApproved.setBounds(10, 160, 330, 20);
		panelLeft.add(lblDateApproved);
		
		JLabel lblDateOfActivity = new JLabel("Date of Activity");
		lblDateOfActivity.setFont(new Font("Arial", Font.PLAIN, 12));
		lblDateOfActivity.setBounds(10, 210, 330, 20);
		panelLeft.add(lblDateOfActivity);
		
		JLabel lblDateDue = new JLabel("Date Due");
		lblDateDue.setFont(new Font("Arial", Font.PLAIN, 12));
		lblDateDue.setBounds(10, 260, 330, 20);
		panelLeft.add(lblDateDue);
		
		JLabel lblOrganizationName = new JLabel("Organization Name");
		lblOrganizationName.setFont(new Font("Arial", Font.PLAIN, 12));
		lblOrganizationName.setBounds(10, 10, 160, 20);
		panelRight.add(lblOrganizationName);
		
		JLabel lblOrganizationType = new JLabel("Organization Type");
		lblOrganizationType.setFont(new Font("Arial", Font.PLAIN, 12));
		lblOrganizationType.setBounds(180, 10, 160, 20);
		panelRight.add(lblOrganizationType);
		
		JLabel lblBeneficiaryName = new JLabel("Beneficiary Name");
		lblBeneficiaryName.setFont(new Font("Arial", Font.PLAIN, 12));
		lblBeneficiaryName.setBounds(10, 60, 330, 20);
		panelRight.add(lblBeneficiaryName);
		
		JLabel lblRemark = new JLabel("Remark");
		lblRemark.setFont(new Font("Arial", Font.PLAIN, 12));
		lblRemark.setBounds(10, 110, 330, 20);
		panelRight.add(lblRemark);
		
		JLabel lblCanceled = new JLabel("Canceled");
		lblCanceled.setFont(new Font("Arial", Font.PLAIN, 12));
		lblCanceled.setBounds(10, 210, 110, 20);
		panelRight.add(lblCanceled);
		
		JLabel lblHasEvaluations = new JLabel("Has Evaluations");
		lblHasEvaluations.setFont(new Font("Arial", Font.PLAIN, 12));
		lblHasEvaluations.setBounds(10, 235, 110, 20);
		panelRight.add(lblHasEvaluations);
		
		txtTitle = new JTextField();
		txtTitle.setBounds(10, 30, 330, 20);
		txtTitle.setColumns(10);
		panelLeft.add(txtTitle);
		
		txtType = new JTextField();
		txtType.setColumns(10);
		txtType.setBounds(10, 80, 330, 20);
		panelLeft.add(txtType);
		
		cmbMonthFiled = new JComboBox<String>();
		cmbMonthFiled.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbMonthFiled.setBounds(10, 130, 181, 20);
		panelLeft.add(cmbMonthFiled);
		
		cmbDayFiled = new JComboBox<String>();
		cmbDayFiled.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbDayFiled.setBounds(201, 130, 50, 20);
		panelLeft.add(cmbDayFiled);
		
		cmbYearFiled = new JComboBox<String>();
		cmbYearFiled.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbYearFiled.setBounds(260, 130, 80, 20);
		panelLeft.add(cmbYearFiled);
		
		cmbMonthApproved = new JComboBox<String>();
		cmbMonthApproved.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbMonthApproved.setBounds(10, 180, 181, 20);
		panelLeft.add(cmbMonthApproved);
		
		cmbDayApproved = new JComboBox<String>();
		cmbDayApproved.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbDayApproved.setBounds(201, 180, 50, 20);
		panelLeft.add(cmbDayApproved);
		
		cmbYearApproved = new JComboBox<String>();
		cmbYearApproved.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbYearApproved.setBounds(260, 180, 80, 20);
		panelLeft.add(cmbYearApproved);
		
		cmbMonthOfActivity = new JComboBox<String>();
		cmbMonthOfActivity.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbMonthOfActivity.setBounds(10, 230, 181, 20);
		panelLeft.add(cmbMonthOfActivity);
		
		cmbDayOfActivity = new JComboBox<String>();
		cmbDayOfActivity.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbDayOfActivity.setBounds(201, 230, 50, 20);
		panelLeft.add(cmbDayOfActivity);
		
		cmbYearOfActivity = new JComboBox<String>();
		cmbYearOfActivity.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbYearOfActivity.setBounds(260, 230, 80, 20);
		panelLeft.add(cmbYearOfActivity);
		
		cmbMonthDue = new JComboBox<String>();
		cmbMonthDue.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbMonthDue.setBounds(10, 280, 181, 20);
		panelLeft.add(cmbMonthDue);
		
		cmbDayDue = new JComboBox<String>();
		cmbDayDue.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbDayDue.setBounds(201, 280, 50, 20);
		panelLeft.add(cmbDayDue);
		
		cmbYearDue = new JComboBox<String>();
		cmbYearDue.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbYearDue.setBounds(260, 280, 80, 20);
		panelLeft.add(cmbYearDue);
		
		txtOrgName = new JTextField();
		txtOrgName.setColumns(10);
		txtOrgName.setBounds(10, 30, 160, 20);
		panelRight.add(txtOrgName);
		
		txtOrgType = new JTextField();
		txtOrgType.setColumns(10);
		txtOrgType.setBounds(180, 30, 160, 20);
		panelRight.add(txtOrgType);
		
		txtBeneficiary = new JTextField();
		txtBeneficiary.setColumns(10);
		txtBeneficiary.setBounds(10, 80, 330, 20);
		panelRight.add(txtBeneficiary);
		
		txaRemark = new JTextArea();
		txaRemark.setFont(new Font("Arial", Font.PLAIN, 12));
		scpRemark.setViewportView(txaRemark);
		
		cmbCanceled = new JComboBox<String>();
		cmbCanceled.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbCanceled.setModel(new DefaultComboBoxModel<String>(new String[] {"Search not canceled only", "Search canceled only", "Search all"}));
		cmbCanceled.setSelectedIndex(2);
		cmbCanceled.setBounds(130, 210, 210, 20);
		panelRight.add(cmbCanceled);
		
		cmbHasEvaluations = new JComboBox<String>();
		cmbHasEvaluations.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbHasEvaluations.setModel(new DefaultComboBoxModel<String>(new String[] {"Search with evaluations only", "Search with no evaluations only", "Search all"}));
		cmbHasEvaluations.setSelectedIndex(2);
		cmbHasEvaluations.setBounds(130, 235, 210, 20);
		panelRight.add(cmbHasEvaluations);
		
		btnClear = new JButton("Clear");
		btnClear.setFont(new Font("Arial", Font.PLAIN, 12));
		btnClear.setBounds(160, 283, 85, 25);
		panelRight.add(btnClear);
		
		btnSearch = new JButton("Search");
		btnSearch.setBounds(255, 283, 85, 25);
		btnSearch.setFont(new Font("Arial", Font.PLAIN, 12));
		panelRight.add(btnSearch);
	}
}
